<?php


namespace catchAdmin\project\request;


use think\Validate;

class ProjectRequest extends Validate
{
    protected $rule = [
        'mode|类型' => [
            'require',
            'in:folder,survey'
        ],
        'name|名称' => [
            'require'
        ],
        'survey|问卷题目' => [
            'requireIf:mode,survey'
        ],
        'dept_list|所属科室' => [
            'requireIf:mode,survey'
        ],
        /*'disease|所属疾病' => [
            'requireIf:mode,survey'
        ],*/
        'survey_type|问卷类型' => [
            'requireIf:mode,survey',
            'in:1,2,3'
        ],
        'patient_id|患者id' => [
            'require'
        ]
    ];

    protected $scene = [
        "create" => ["mode", "name", "survey", "survey_type"],

    ];

}